#include "BlackDeath.Core.h"

namespace BlackDeath
{
	namespace Core
	{
		class CGame;

		class CGameWindow
		{
			private:
			#pragma region Variables
				HWND m_hWnd;//handle to window
				HDC m_hDeviceContext;//handle to device context
				HINSTANCE m_hInst;//handle instance
				WNDCLASS m_sWndClass;//window class
				DWORD m_dwStyles;
				DWORD m_dwExStyles;
				char* m_sTitle;//title of window
				RECT m_rcDisplayRect;//display rectangle
				RECT m_rcClientRect;//client rectangle
				BlackDeath::Graphics::CGraphicsDevice* m_pDevice;//graphics device
			#pragma endregion

			#pragma region Static_Methods
				static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
				void InitializeClass(WNDCLASS*);
				HRESULT InternalCreateWindow();
				void InternalDestroyWindow();
			#pragma endregion

			public:
			#pragma region Constructor and Destructor
				CGameWindow();
				virtual ~CGameWindow();
			#pragma endregion

			#pragma region Options
				void Show();
				void Close();
			#pragma endregion

			#pragma region Properties
				HWND Get_Handle();
				HINSTANCE Get_Instance();
				RECT Get_DisplayRectangle();
				void Set_DisplayRectangle(RECT);
				RECT Get_ClientRectangle();
				void Set_ClientRectangle(RECT);
			#pragma endregion

			protected:
			#pragma region More_Options
				HRESULT CreateHandle();
				void DestroyHandle();
			#pragma endregion

				friend class BlackDeath::Core::CGame;
				friend class BlackDeath::Graphics::CGraphicsDevice;
		};
	}
}